GtkWidget: Change which states propagate
authorAlexander Larsson <alexl@redhat.com>
Mon, 10 Jun 2013 15:02:34 +0000 (17:02 +0200)
committerAlexander Larsson <alexl@redhat.com>
Thu, 13 Jun 2013 10:17:07 +0000 (12:17 +0200)
commit6a77754c77eed2b128aeff0a09a428c0b5f5512e
treedaf22e64365e10bf13110b7b354a825dcb3fc8bf
parentecff28bb68cce8ee418723c52addd1d649fa82a9
GtkWidget: Change which states propagate

Historically the following states propagated to children:
  GTK_STATE_FLAG_ACTIVE
  GTK_STATE_FLAG_PRELIGHT
  GTK_STATE_FLAG_SELECTED
  GTK_STATE_FLAG_INSENSITIVE
  GTK_STATE_FLAG_INCONSISTENT
  GTK_STATE_FLAG_BACKDROP

However, several of these are problematic on containers like GtkListBox.
For instance, if a row is ACTIVE or SELECTED then all children (like e.g
a button) inside the row will *also* look active/selected. This is almost
never right. The right way to theme this is to catch e.g. SELECTED on the
container itself and set e.g. the color and let the children inherit
the color instead of the flag.

We now propagate only these flags:
  GTK_STATE_FLAG_INSENSITIVE
  GTK_STATE_FLAG_BACKDROP

Which make sense to be recursive as they really affect every widget
inside the container.

However, this is a CSS theme break, and while most things continue working
as-is some themes may need minor tweaks.
gtk/gtkwidget.c